package org.jeecg.modules.gongqiang.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.front.entity.vo.FrontUserhomeOrder;
import org.jeecg.modules.gongqiang.entity.GoodDetail;
import org.jeecg.modules.gongqiang.entity.Good;
import com.baomidou.mybatisplus.extension.service.IService;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 商品主表
 * @Author: jeecg-boot
 * @Date:   2024-06-12
 * @Version: V1.0
 */
public interface IGoodService extends IService<Good> {

	/**
	 * 添加一对多
	 *
	 * @param good
	 * @param goodDetailList
	 */
	public void saveMain(Good good,List<GoodDetail> goodDetailList) ;
	
	/**
	 * 修改一对多
	 *
   * @param good
   * @param goodDetailList
	 */
	public void updateMain(Good good,List<GoodDetail> goodDetailList);
	
	/**
	 * 删除一对多
	 *
	 * @param id
	 */
	public void delMain (String id);
	
	/**
	 * 批量删除一对多
	 *
	 * @param idList
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

    IPage<FrontUserhomeOrder> pageIndexList(Page<FrontUserhomeOrder> page, Integer status, Integer userId);

    FrontUserhomeOrder pageIndex(String orderId);
}
